Devices operating according to 100BASE-TX or 10BASE-T in an Ethernet network are connected by four pairs of wires. Only two pairs of wires are required. Referring now FIGS. 1 and 2, first and second network devices or network devices 10 and 12 include physical layers (PHYs) 14 and 16 that are connected. For example, the network device 10 can be a personal computer or printer and the network device 12 can be a network switch. Each of the network devices 10 and 12 includes at least two pairs of twisted pair wires that are labeled 1, 2 and 3, 6 in FIGS. 1 and 2.
When in an MDI configuration, the PHY 14 has a first pair 1, 2 that is configured as a transmitter 20 and a second pair 3, 6 that is configured as a receiver 24. When in an MDIX configuration, the PHY 16 has a first pair 1, 2 that is configured as a receiver 30 and a second pair 3, 6 that is configured as a transmitter 34. When the network devices 10 and 12 have different configurations, a standard or straight cable 40 is used. When the network devices 10 and 12 have the same configuration, a crossover cable 42 is used.
The use of two different types of cables increases customer equipment inventory and may lead to the inadvertent use of the wrong type of cable. To eliminate the need for two types of cable, some PHYs employ an auto-crossover circuit that automatically switches the PHY between the two configurations. In other words, if the PHY 14 of FIG. 1 is auto-crossover enabled, the PHY 14 is capable of automatically reconfiguring the first pair 1, 2 as a receiver 36 and the second pair 3, 6 as a transmitter 38 as is illustrated in FIG. 2. The auto-crossover function is described more fully in IEEE section 802.3, which is hereby incorporated by reference. In particular, subsections 40.4.4-40.4.6 of IEEE section 802.3 address the auto-crossover capability.
There are different Ethernet networking standards having different data rates. 1000BASE-TX has a maximum data rate of 1 Gb/s. 100BASE-TX has a maximum data rate of 100 Mb/s. 10BASE-T has a maximum data rate of 10 Mb/s. When two network devices communicate, they preferably communicate at the highest common speed. The procedure for negotiating the communication speed and other connection details is called autonegotiation. Further details concerning autonegotiation are also set forth in IEEE section 802.3.
Referring now to FIG. 3, an exemplary network device 50 is shown. The network device 50 includes a PHY 52 with a transmitter and a receiver that are collectively identified at 54. The PHY 52 is capable of operating at 10 Mb/s, 100 Mb/s and/or 1000 Mb/s. The PHY 52 includes a digital signal processor (DSP) 56. The PHY 52 includes an autonegotiation circuit 60 with an autonegotiation wait timer 62 and a link loss timer 64. The PHY 52 optionally includes an auto-crossover circuit 66 with a sample timer 68 and a random number generator 70. The PHY 52 may include other conventional PHY circuits that are collectively identified at 74. As can be appreciated, the autonegotiation circuit 60 and/or the auto-crossover circuit 66 may be disabled, the PHY 52 may be operated in forced 10 Mb/s or 100 Mb/s modes, and/or the PHY 52 may be a legacy device. One or both of the autonegotiation or auto-crossover circuits may be disabled during debug or troubleshooting to reduce system complexity. Legacy PHY devices are typically autonegotiation enabled but are not auto-crossover enabled.
“Parallel detect” describes how autonegotiation is resolved when one network device is autonegotiating while the other network device is in a forced 10 or 100 Mb/s mode. Referring now to FIG. 4, a simplified state diagram corresponding to FIGS. 28-16 of IEEE section 802.3 is shown. A typical state transition for a network device is through blocks 80→82→84→86→82→84→88→94. When a network device is operating in a forced 10 or 100 Mb/s mode or is a legacy device, a problematic state transition that sometimes occurs (and that will be described more fully below) is through blocks 80→90→92→80. Block 90 is associated with an autonegotiation wait timer that typically has a period between 500 ms and 1000 ms. If the link drops out, the autonegotiation state machine transitions from block 90 to block 92 and returns to the initial state in block 80.
In the sections that follow, a legacy parallel detect operation is described for network devices that do not have auto-crossover capabilities. Afterwards, a parallel detect operation is described for a forced 10 or 100 Mb/s network device with auto-crossover capability. In both descriptions, it will be assumed that the autonegotiating device is not auto-crossover capable, which is true for all 10 or 100 Mb/s legacy PHYs.
In a first example involving parallel detect with no auto-crossover capability, a crossover cable is used and both PHYs transmit on pairs 1, 2 and receive on pairs 3, 6. The autonegotiating (AN) PHY starts sending fast link pulses (FLPs). The forced PHY sends normal link pulses (NLPs) in 10 Mb/s mode or scrambled idles in 100 Mb/s mode. When the AN PHY detects either NLPs or scrambled idles, the AN PHY expects the forced network device to continue sending the NLPs or scrambled idles. During an autonegotiation wait timer period, the receiver of the AN PHY detects the NLPs or scrambled idles. If the AN PHY stops detecting the NLPs or scrambled idles for a link loss timer period, the receiver of the AN PHY enters a parallel detect fault state and returns to an initial state. Otherwise when the autonegotiation wait timer period expires, the autonegotiation state machine enables the 10 Mb/s physical medium attachment (PMA) if the received signals were NLPs or the 100 Mb/s PMA if the received signals were 100 Mb/s scrambled idles.
In this example, important timers are the autonegotiation wait timer and a link loss timer (that typically has a period of 50-100 ms). During the autonegotiation wait timer period (e.g., 1000 ms) after detecting the original NLPs, if no NLPs are received for the link loss timer period (e.g. 50 ms), then the link is considered lost and the AN PHY enters the parallel detect fault state.
In a second example involving parallel detect with auto-crossover, a crossover cable is used and the network devices are powered up. Both PHYs transmit on pairs 1, 2 and receive on pairs 3, 6. The AN PHY starts sending FLPs and the forced PHY sends NLPs in 10 Mb/s mode or scrambled idles in 100 Mb/s mode. When the AN PHY detects either NLP or scrambled idles, the AN PHY starts the autonegotiation wait timer and stops sending FLPs. During the timer period, the parallel detect state machine of the AN PHY expects the forced network device to continue sending the NLPs or scrambled idles. Since the AN PHY stopped sending FLPs, the forced network device does not detect a network device. Since the forced network device has auto-crossover capability, the forced network device will reconfigure and begin transmitting on pairs 3, 6 and receiving on pair 1, 2.
The auto-crossover happens after waiting for a sample timer period, which is typically 62 ms+/−2 ms. When the forced network device stops sending on pair 1, 2, the AN PHY will stop receiving on pair 3, 6. The AN PHY expects to receive signals on pair 3, 6 for at least a period equal to the autonegotiation wait period. Therefore, the AN PHY will enter the parallel detect fault state and return to an initial state.
While the forced network device is transmitting on the pair 3, 6, the AN PHY does not receive a signal on the pair 3, 6. If the AN PHY is not auto-crossover enabled, the AN PHY expects to receive signals on the pair 3, 6. Since the PHY of the forced network device is listening on the pair 1, 2 and the AN PHY is sending FLPs on the pair 1, 2, the forced network device will not receive anything either (remember the crossover cable). The PHY of the forced network device eventually switches to MDI operation (the original state) and begins transmitting on pair 1, 2 and receiving on pair 3, 6. Operation repeats as described above and the link is never established. In the second situation, important timers are the autonegotiation wait timer, the link loss timer, and the sample timer.
Customers expect to have the auto-crossover capability even iwhen operating in forced 10 or 100 Mb/s modes of operation. As can be appreciated, the discussion set forth above has been simplified for clarity. Auto-crossover circuits generate random numbers when deciding whether to switch between MDI or MDIX modes as is described further in IEEE section 802.3. Referring now to FIG. 5, an auto-crossover state diagram (FIGS. 40-17 of IEEE section 802.3) is shown that illustrates the random number function. It is possible that a switch may take up to 11 sample timers, which may or may not allow a link before the autonegotiation wait timer expires. Note that the sample timer is associated with the auto-crossover circuit.
In summary, conventional auto-crossover circuits are designed to run with autonegotiation enabled. As currently defined, the auto-crossover sample timer is incompatible with the autonegotiation wait timer. Therefore, auto-crossover may not work between two PHYs when a first PHY is forced to 100Base-TX and a second PHY is autonegotiation enabled or when a first PHY is forced to 10Base-T and a second PHY is autonegotiation enabled.